package com.up.upzl.biz.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.up.upzl.base.domain.BaseDomain;

import lombok.Getter;
import lombok.Setter;

/**
 * 留言
 * 
 * @author youke
 *
 */
@Getter
@Setter
@Entity
public class Comment extends BaseDomain {


	/**
	 * 
	 */
	private static final long serialVersionUID = -6864440077339747803L;

	
	/**
	 * APP创建人
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
	private User user;
	
	/**
	 * 后台创建人
	 */
	@ManyToOne
	@JoinColumn(name = "account_id")
	private SysAccount sysAccount;
	
	/**
	 * 留言内容
	 */
	@Column(length = 80, nullable = false)
	private String content;
	
	/**
	 * 拒绝原因
	 */
	@Column(length = 80)
	private String quitReason;
	
	/**
	 * 关联文章id
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "article_id")
	private Article article;
	
	/**
	 * 展示标识
	 * 精选, 优质, 优铺官方
	 */
	private Label label;
	
	public enum Label{
		精选, 优质, 优铺官方
	}
	
	/**
	 * 发布者来源
	 * 后台, APP
	 */
	private AddSource addSource;
	
	public enum AddSource{
		后台, APP
	}

	/**
	 * 审核
	 * 未审核, 通过, 拒绝
	 */
	
	private Auditing auditing;
	
	public enum Auditing{
		未审核, 通过, 拒绝
	}
	
	/**
	 * 点赞量
	 */
	
	private Integer clickNumber;
	
	/**
	 * 排序
	 */
	
	private Long sort;

}
